function sendToGetList(href, type) {
	client.onreadystatechange = callback;
	client.open("GET", href + "?type=" + type, true);
	client.send(null);
	function callback() {
		if (client.readyState == 4) {
			if (client.status == 200) {
				var resposeText = client.responseText;
				setShopList(resposeText);
			}
		}
	}
}

function setShopList(jsonData) {
	var myJson = eval("(" + jsonData + ")");
	for (var i = 0; i < 3; i++) {
		var div = document.createElement("DIV");
		div.id = "d" + (i + 1);
		var td = document.getElementById("t" + (i + 1));
		td.appendChild(div);
	}
	for (var i = 0; i < 3; i++) {
		var div = document.getElementById("d" + (i + 1));
		var uu = "ol";
		uu = document.createElement("ol");
		uu.type = 1;
		uu.value = 1;
		for (var j = 0; j < myJson.data.length; j++) {
			var ll = "li" + j;
			var ll = document.createElement("LI");
			var sname = myJson.data[j].sname;
			if (sname.length > 11) {
				sname = sname.substring(0, 11) + "...";
			}
			if (myJson.data[j].level == 5) {

				ll.innerHTML = sname + "<img src='images/guan5.gif'/>";
			} else {
				ll.innerHTML = sname;
			}
			uu.appendChild(ll);
		}
		div.appendChild(uu);
	}
}

function setSale() {
	try {
		for (var i = 1; i < 9; i++) {
			for (var j = 1; j < 9; j++) {
				var div = document.createElement("DIV");
				div.id = "d" + i + j;
				div.align = "center";
				var td = document.getElementById("s" + i + j);
				td.appendChild(div);
			}
		}
	} catch (e) {
	}
	try {
		for (var i = 1; i < 9; i++) {
			for (var j = 1; j < 9; j++) {
				var div = document.getElementById("d" + i + j);
				var img = document.createElement("img");
				var num=(i<5? i:3);
				img.src = "images/16"+(5+num)+"s.jpg";
				img.width = "66";
				img.height = "84";
				var br = document.createElement("br");
				var br2 = document.createElement("br");
				var alink = document.createElement("a");
				alink.setAttribute('href', "#");
				alink.appendChild(document.createTextNode("新款日韩版长袖方领"));
				var alink2 = document.createTextNode("淘宝价：88 元");
				div.appendChild(img);
				div.appendChild(br);
				div.appendChild(alink);
				div.appendChild(br2);
				div.appendChild(alink2);
			}
		}
	} catch (e) {
	}
}

function setLeftList() {

	for (var i = 0; i < 5; i++) {
		if (i == 0) {
			var img = document.createElement("img");
			img.src = "images/bagua.jpg";
			img.width = "90";
			img.height = "90";
			var td = document.getElementById("YL" + (i + 1));
			var text = document.createTextNode("说明44");
			var td2 = document.getElementById("YL" + (i + 2));
			td.appendChild(img);
			td2.appendChild(text);
		} else {
			var uu = "ul";
			uu = document.createElement("ul");
			var ll = "li" + i;
			var ll = document.createElement("LI");
			ll.innerHTML = "说明" + i;
			uu.appendChild(ll);
			var td = document.getElementById("YL3");
			td.appendChild(uu);
		}

	}
}
function setLeftList2() {

	for (var i = 0; i < 5; i++) {
		if (i == 0) {
			var img = document.createElement("img");
			img.src = "images/bagua.jpg";
			img.width = "90";
			img.height = "90";
			var td = document.getElementById("SL" + (i + 1));
			var text = document.createTextNode("说明44");
			var td2 = document.getElementById("SL" + (i + 2));
			td.appendChild(img);
			td2.appendChild(text);
		} else {
			var uu = "ul";
			uu = document.createElement("ul");
			var ll = "li" + i;
			var ll = document.createElement("LI");
			ll.innerHTML = "说明" + i;
			uu.appendChild(ll);
			var td = document.getElementById("SL3");
			td.appendChild(uu);
		}

	}
}
function setLeftList3() {

	for (var i = 0; i < 5; i++) {
		if (i == 0) {
			var img = document.createElement("img");
			img.src = "images/bagua.jpg";
			img.width = "90";
			img.height = "90";
			var td = document.getElementById("TL" + (i + 1));
			var text = document.createTextNode("说明44");
			var td2 = document.getElementById("TL" + (i + 2));
			td.appendChild(img);
			td2.appendChild(text);
		} else {
			var uu = "ul";
			uu = document.createElement("ul");
			var ll = "li" + i;
			var ll = document.createElement("LI");
			ll.innerHTML = "说明" + i;
			uu.appendChild(ll);
			var td = document.getElementById("TL3");
			td.appendChild(uu);
		}

	}
}
function setLeftList4() {

	for (var i = 0; i < 5; i++) {
		if (i == 0) {
			var img = document.createElement("img");
			img.src = "images/bagua.jpg";
			img.width = "90";
			img.height = "90";
			var td = document.getElementById("RL" + (i + 1));
			var text = document.createTextNode("说明44");
			var td2 = document.getElementById("RL" + (i + 2));
			td.appendChild(img);
			td2.appendChild(text);
		} else {
			var uu = "ul";
			uu = document.createElement("ul");
			var ll = "li" + i;
			var ll = document.createElement("LI");
			ll.innerHTML = "说明" + i;
			uu.appendChild(ll);
			var td = document.getElementById("RL3");
			td.appendChild(uu);
		}

	}
}
function setAds() {
	var img = document.createElement("img");
	img.src = "images/ads.jpg";
	var div = document.getElementById("ads");
	div.appendChild(img);
}

